﻿#pragma once

#include <stdio.h>
#include <stdlib.h>

#include <string>
#include <sstream>
#include <iostream>

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#include <process.h>

#include <WinSock2.h>
#pragma comment(lib, "ws2_32")
//#pragma comment(lib, "kernel32")

typedef enum IO_OPERATION
{
    IO_WRITE,
    IO_READ
}IO_OPERATION;

typedef struct IO_DATA {
    int size;
    IO_OPERATION op;
    WSABUF wsaBuf;
    OVERLAPPED overlapped;
    SOCKET socket;
}IO_DATA;

class Global
{
public:
    Global();
    virtual ~Global();

    HANDLE hIocp;
    char buffer[2048];
};

extern Global g;